﻿CREATE TABLE [dbo].[Finance_Bank] (
    [Id]              INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [BId]             UNIQUEIDENTIFIER CONSTRAINT [DF_Finance_Bank_BId] DEFAULT (newid()) ROWGUIDCOL NULL,
    [TypeId]          INT              CONSTRAINT [DF_Finance_Bank_TypeId] DEFAULT ((0)) NULL,
    [InitialMoney]    NUMERIC (18, 2)  NULL,
    [CompanyId]       INT              NULL,
    [OpenBank]        NVARCHAR (50)    NULL,
    [AccountName]     NVARCHAR (50)    NULL,
    [AccountCartId]   NVARCHAR (50)    NULL,
    [CreateDate]      DATETIME         CONSTRAINT [DF_Finance_Bank_CreateDate] DEFAULT (getdate()) NULL,
    [UserName]        NVARCHAR (50)    NULL,
    [Sort]            INT              CONSTRAINT [DF_Finance_Bank_Soft] DEFAULT ((0)) NULL,
    [PaymentTypeId]   INT              CONSTRAINT [DF_Finance_Bank_PaymentTypeId_1] DEFAULT ((-1)) NULL,
    [PaymentTypeName] NVARCHAR (50)    CONSTRAINT [DF_Finance_Bank_PaymentTypeName_1] DEFAULT ('') NULL,
    CONSTRAINT [PK_Finance_Bank] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'1现金；2银行', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_Bank', @level2type = N'COLUMN', @level2name = N'PaymentTypeId';

